// Package router
// @Author: zhangdi
// @File: router_swagger
// @Version: 1.0.0
// @Date: 2023/10/30 15:44
package router

import (
	swaggerfiles "github.com/swaggo/files"
	ginSwagger "github.com/swaggo/gin-swagger"
)

func init() {

	url := ginSwagger.URL("/static/docs/swagger.yaml") // 设置Swagger接口文档的URL路径
	//访问方式：域名/swagger/index.html
	AppendRouter(ItemInfo{
		Path:           "/swagger/*any",
		Handlers:       ginSwagger.WrapHandler(swaggerfiles.Handler, url),
		HttpType:       HttpGet,
		NeedLogin:      false,
		NeedPermission: false,
		PermissionName: "",
		Swagger: &SwaggerInfo{
			IsIgnore: true, //跳过该接口
		},
	})
}
